Optimal. Leaf size=70 \[ \frac {\left (b^2 c+a^2 d\right ) (a+b x)^{1+n}}{b^3 (1+n)}-\frac {2 a d (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d (a+b x)^{3+n}}{b^3 (3+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {711}
\begin {gather*} \frac {\left (a^2 d+b^2 c\right ) (a+b x)^{n+1}}{b^3 (n+1)}-\frac {2 a d (a+b x)^{n+2}}{b^3 (n+2)}+\frac {d (a+b x)^{n+3}}{b^3 (n+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rubi steps
\begin {align*} \int (a+b x)^n \left (c+d x^2\right ) \, dx &=\int \left (\frac {\left (b^2 c+a^2 d\right ) (a+b x)^n}{b^2}-\frac {2 a d (a+b x)^{1+n}}{b^2}+\frac {d (a+b x)^{2+n}}{b^2}\right ) \, dx\\ &=\frac {\left (b^2 c+a^2 d\right ) (a+b x)^{1+n}}{b^3 (1+n)}-\frac {2 a d (a+b x)^{2+n}}{b^3 (2+n)}+\frac {d (a+b x)^{3+n}}{b^3 (3+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 65, normalized size = 0.93 \begin {gather*} \frac {(a+b x)^{1+n} \left (2 a^2 d-2 a b d (1+n) x+b^2 (2+n) \left (c (3+n)+d (1+n) x^2\right )\right )}{b^3 (1+n) (2+n) (3+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 100, normalized size = 1.43
method | result | size |
gosper | \(\frac {\left (b x +a \right )^{1+n} \left (b^{2} d \,n^{2} x^{2}+3 b^{2} d n \,x^{2}-2 a b d n x +b^{2} c \,n^{2}+2 d \,x^{2} b^{2}-2 a d x b +5 b^{2} c n +2 a^{2} d +6 b^{2} c \right )}{b^{3} \left (n^{3}+6 n^{2}+11 n +6\right )}\) | \(100\) |
risch | \(\frac {\left (b^{3} d \,n^{2} x^{3}+a \,b^{2} d \,n^{2} x^{2}+3 b^{3} d n \,x^{3}+a \,b^{2} d n \,x^{2}+b^{3} c \,n^{2} x +2 d \,x^{3} b^{3}-2 a^{2} b d n x +a \,b^{2} c \,n^{2}+5 b^{3} c n x +5 a \,b^{2} c n +6 b^{3} c x +2 a^{3} d +6 a \,b^{2} c \right ) \left (b x +a \right )^{n}}{\left (2+n \right ) \left (3+n \right ) \left (1+n \right ) b^{3}}\) | \(143\) |
norman | \(\frac {d \,x^{3} {\mathrm e}^{n \ln \left (b x +a \right )}}{3+n}+\frac {a \left (b^{2} c \,n^{2}+5 b^{2} c n +2 a^{2} d +6 b^{2} c \right ) {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{3} \left (n^{3}+6 n^{2}+11 n +6\right )}+\frac {a d n \,x^{2} {\mathrm e}^{n \ln \left (b x +a \right )}}{b \left (n^{2}+5 n +6\right )}-\frac {\left (-b^{2} c \,n^{2}+2 a^{2} d n -5 b^{2} c n -6 b^{2} c \right ) x \,{\mathrm e}^{n \ln \left (b x +a \right )}}{b^{2} \left (n^{3}+6 n^{2}+11 n +6\right )}\) | \(167\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 89, normalized size = 1.27 \begin {gather*} \frac {{\left (b x + a\right )}^{n + 1} c}{b {\left (n + 1\right )}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} b^{3} x^{3} + {\left (n^{2} + n\right )} a b^{2} x^{2} - 2 \, a^{2} b n x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{n} d}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 148 vs.
\(2 (70) = 140\).
time = 2.36, size = 148, normalized size = 2.11 \begin {gather*} \frac {{\left (a b^{2} c n^{2} + 5 \, a b^{2} c n + 6 \, a b^{2} c + 2 \, a^{3} d + {\left (b^{3} d n^{2} + 3 \, b^{3} d n + 2 \, b^{3} d\right )} x^{3} + {\left (a b^{2} d n^{2} + a b^{2} d n\right )} x^{2} + {\left (b^{3} c n^{2} + 6 \, b^{3} c + {\left (5 \, b^{3} c - 2 \, a^{2} b d\right )} n\right )} x\right )} {\left (b x + a\right )}^{n}}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 952 vs.
\(2 (61) = 122\).
time = 0.48, size = 952, normalized size = 13.60 \begin {gather*} \begin {cases} a^{n} \left (c x + \frac {d x^{3}}{3}\right ) & \text {for}\: b = 0 \\\frac {2 a^{2} d \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {3 a^{2} d}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {4 a b d x \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {4 a b d x}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} - \frac {b^{2} c}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} + \frac {2 b^{2} d x^{2} \log {\left (\frac {a}{b} + x \right )}}{2 a^{2} b^{3} + 4 a b^{4} x + 2 b^{5} x^{2}} & \text {for}\: n = -3 \\- \frac {2 a^{2} d \log {\left (\frac {a}{b} + x \right )}}{a b^{3} + b^{4} x} - \frac {2 a^{2} d}{a b^{3} + b^{4} x} - \frac {2 a b d x \log {\left (\frac {a}{b} + x \right )}}{a b^{3} + b^{4} x} - \frac {b^{2} c}{a b^{3} + b^{4} x} + \frac {b^{2} d x^{2}}{a b^{3} + b^{4} x} & \text {for}\: n = -2 \\\frac {a^{2} d \log {\left (\frac {a}{b} + x \right )}}{b^{3}} - \frac {a d x}{b^{2}} + \frac {c \log {\left (\frac {a}{b} + x \right )}}{b} + \frac {d x^{2}}{2 b} & \text {for}\: n = -1 \\\frac {2 a^{3} d \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} - \frac {2 a^{2} b d n x \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {a b^{2} c n^{2} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {5 a b^{2} c n \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {6 a b^{2} c \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {a b^{2} d n^{2} x^{2} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {a b^{2} d n x^{2} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {b^{3} c n^{2} x \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {5 b^{3} c n x \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {6 b^{3} c x \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {b^{3} d n^{2} x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {3 b^{3} d n x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} + \frac {2 b^{3} d x^{3} \left (a + b x\right )^{n}}{b^{3} n^{3} + 6 b^{3} n^{2} + 11 b^{3} n + 6 b^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 237 vs.
\(2 (70) = 140\).
time = 1.39, size = 237, normalized size = 3.39 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b^{3} d n^{2} x^{3} + {\left (b x + a\right )}^{n} a b^{2} d n^{2} x^{2} + 3 \, {\left (b x + a\right )}^{n} b^{3} d n x^{3} + {\left (b x + a\right )}^{n} b^{3} c n^{2} x + {\left (b x + a\right )}^{n} a b^{2} d n x^{2} + 2 \, {\left (b x + a\right )}^{n} b^{3} d x^{3} + {\left (b x + a\right )}^{n} a b^{2} c n^{2} + 5 \, {\left (b x + a\right )}^{n} b^{3} c n x - 2 \, {\left (b x + a\right )}^{n} a^{2} b d n x + 5 \, {\left (b x + a\right )}^{n} a b^{2} c n + 6 \, {\left (b x + a\right )}^{n} b^{3} c x + 6 \, {\left (b x + a\right )}^{n} a b^{2} c + 2 \, {\left (b x + a\right )}^{n} a^{3} d}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.63, size = 163, normalized size = 2.33 \begin {gather*} {\left (a+b\,x\right )}^n\,\left (\frac {d\,x^3\,\left (n^2+3\,n+2\right )}{n^3+6\,n^2+11\,n+6}+\frac {x\,\left (-2\,d\,a^2\,b\,n+c\,b^3\,n^2+5\,c\,b^3\,n+6\,c\,b^3\right )}{b^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {a\,\left (2\,d\,a^2+c\,b^2\,n^2+5\,c\,b^2\,n+6\,c\,b^2\right )}{b^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {a\,d\,n\,x^2\,\left (n+1\right )}{b\,\left (n^3+6\,n^2+11\,n+6\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________